﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Spring.Context;
using Spring.Context.Support;

namespace Atomic.Web.Handlers
{
    /// <summary>
    ///ContextFactory 的摘要说明
    /// </summary>
    public class ContextFactory
    {
        static IApplicationContext context = null;
        static ContextFactory()
        {
            try
            {
                context = ContextRegistry.GetContext();
            }
            catch (Exception e)
            {
                throw e;
            }
        }

        public static IApplicationContext Context
        {
            get
            {
                return context;
            }
        }
    }
}